<template>
  <div id="shopList">
    <div class="rightBox01">
      <div class="btn_group01">
        <button>抖音小店排行榜</button>
      </div>
      <div class="rightBox-content">
        <!-- 商品种类 -->
        <category_goods
          v-model="checkedDatasJoe"
        />
        <!-- 时间 -->
        <section class>
          <!-- 时间 -->
          <time_options v-model="time" :radio_values="['日榜']" class="timeOptions" :timing="$global.timing"/>
          <!-- 搜索 -->
          <section class="search01">
            <div class="searchBox">
              <el-input
                v-model="keywords"
                placeholder="  请输入店铺名称在排行榜中搜索"
                @keyup.enter.native="toSearch"
              ></el-input>
              <div class="imgBox" @click="toSearch">
                <!-- <img src="@/assets/wang/talentCompare/search.png" /> -->
              </div>
            </div>
          </section>
          <div class="btn_group">
            <button @click="generatorImage">
              <span></span>分享
            </button>
            <button @click="export_data">
              <span></span>导出
            </button>
          </div>
        </section>
        <!-- table -->
        <ul
          class="fixedThead"
          ref="fixedThead"
          :class="{ isShow: isFixed }"
          :style="showLeft == true ? 'left:222px' : 'left:98px'"
        >
          <li tc>排名</li>
          <li>店铺</li>
          <li
            tc
            v-if="orderBy == 0 && sort != 1"
            style="  cursor: pointer;"
            @click="sort_fun(false, 1)"
          >
            <el-tooltip effect="light" content="当日橱窗商品数" placement="top" popper-class="mytooltip">
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>推广商品数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 1" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 1">
            <el-tooltip effect="light" content="当日橱窗商品数" placement="top" popper-class="mytooltip">
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>推广商品数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 1" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>

          <li
            tc
            v-if="orderBy == 0 && sort != 2"
            style="  cursor: pointer;"
            @click="sort_fun(false, 2)"
          >
            <el-tooltip
              effect="light"
              content="当日正在推广的达人数"
              placement="top"
              popper-class="mytooltip"
            >
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>关联达人数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 2" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 2">
            <el-tooltip
              effect="light"
              content="当日正在推广的达人数"
              placement="top"
              popper-class="mytooltip"
            >
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>关联达人数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 2" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>

          <li
            tc
            v-if="orderBy == 0 && sort != 3"
            style="  cursor: pointer;"
            @click="sort_fun(false, 3)"
          >
            <el-tooltip effect="light" content="当日发布的视频" placement="top" popper-class="mytooltip">
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>关联视频数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 3" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 3">
            <el-tooltip effect="light" content="当日发布的视频" placement="top" popper-class="mytooltip">
              <img src="@/assets/meng/search_result04.png" class="remarkImg" />
            </el-tooltip>关联视频数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 3" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li
            tc
            v-if="orderBy == 0 && sort != 4"
            style="  cursor: pointer;"
            @click="sort_fun(false, 4)"
          >
            关联直播数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 4" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 4">
            关联直播数
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 4" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li
            tc
            v-if="orderBy == 0 && sort != 0"
            style="  cursor: pointer;"
            @click="sort_fun(false, 0)"
          >
            预估销量（件）
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderBy == 0 && sort == 0"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 0">
            预估销量（件）
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderBy == 0 && sort == 0"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>

          <li
            tc
            v-if="orderBy == 0 && sort != 5"
            style="  cursor: pointer;"
            @click="sort_fun(false, 5)"
          >
            预估销售额
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 5" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <li tc v-if="orderBy == 0 && sort == 5">
            预估销售额
            <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 5" class="sort" />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </li>
          <!-- <th>
              转化率
              <img
                src="@/assets/meng/up_down.png"
                v-if="orderBy == 1 && sort == 6"
              /><img
                src="@/assets/meng/no_up_down.png"
                v-else
                @click="sort_fun(true, 6)"
              /><img
                src="@/assets/meng/down_up.png"
                v-if="orderBy == 0 && sort == 6"
              /><img
                src="@/assets/meng/no_down_up.png"
                v-else
                @click="sort_fun(false, 6)"
              />
          </th>-->
          <li tc>操作</li>
        </ul>
        <section ref="capture">
          <table class="table">
            <thead>
              <tr>
                <th>排名</th>
                <th>店铺</th>
                <th
                  v-if="orderBy == 0 && sort != 1"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 1)"
                >
                  <el-tooltip
                    effect="light"
                    content="当日橱窗商品数"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>推广商品数
                  <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 1" />
                  <img src="@/assets/meng/no_down_up.png" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 1">
                  <el-tooltip
                    effect="light"
                    content="当日橱窗商品数"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>推广商品数
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 1"
                    class="sort"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
                </th>

                <th
                  v-if="orderBy == 0 && sort != 2"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 2)"
                >
                  <el-tooltip
                    effect="light"
                    content="当日正在推广的达人数"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>关联达人数
                  <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 2" />
                  <img src="@/assets/meng/no_down_up.png" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 2">
                  <el-tooltip
                    effect="light"
                    content="当日正在推广的达人数"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>关联达人数
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 2"
                    class="sort"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
                </th>

                <th
                  v-if="orderBy == 0 && sort != 3"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 3)"
                >
                  <el-tooltip
                    effect="light"
                    content="当日发布的视频"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>关联视频数
                  <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 3" />
                  <img src="@/assets/meng/no_down_up.png" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 3">
                  <el-tooltip
                    effect="light"
                    content="当日发布的视频"
                    placement="top"
                    popper-class="mytooltip"
                  >
                    <img src="@/assets/meng/search_result04.png" class="remarkImg" />
                  </el-tooltip>关联视频数
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 3"
                    class="sort"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
                </th>
                <th
                  v-if="orderBy == 0 && sort != 4"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 4)"
                >
                  关联直播数
                  <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 4" />
                  <img src="@/assets/meng/no_down_up.png" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 4">
                  关联直播数
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 4"
                    class="sort"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
                </th>
                <th
                  v-if="orderBy == 0 && sort != 0"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 0)"
                >
                  预估销量（件）
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 0"
                    class="m-l"
                  />
                  <img src="@/assets/meng/no_down_up.png" class="m-l" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 0">
                  预估销量（件）
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 0"
                    class="m-l"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="m-l" />
                </th>

                <th
                  v-if="orderBy == 0 && sort != 5"
                  style="  cursor: pointer;"
                  @click="sort_fun(false, 5)"
                >
                  预估销售额
                  <img src="@/assets/meng/down_up.png" v-if="orderBy == 0 && sort == 5" />
                  <img src="@/assets/meng/no_down_up.png" v-else />
                </th>
                <th v-if="orderBy == 0 && sort == 5">
                  预估销售额
                  <img
                    src="@/assets/meng/down_up.png"
                    v-if="orderBy == 0 && sort == 5"
                    class="sort"
                  />
                  <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
                </th>
                <!-- <th>
              转化率
              <img
                src="@/assets/meng/up_down.png"
                v-if="orderBy == 1 && sort == 6"
              /><img
                src="@/assets/meng/no_up_down.png"
                v-else
                @click="sort_fun(true, 6)"
              /><img
                src="@/assets/meng/down_up.png"
                v-if="orderBy == 0 && sort == 6"
              /><img
                src="@/assets/meng/no_down_up.png"
                v-else
                @click="sort_fun(false, 6)"
              />
                </th>-->
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(item, index) in dataList" :key="'i1' + index" :id="!index ? 'tr1' : ''">
                <td>
                  <span>{{ item.rank }}</span>
                </td>
                <td>
                  <div class="shopBox" @click="toDetails(item.shopId)">
                    <img :src="item.shopLogo" alt v-errorImg:smallShop />
                    <div class="rightBox">
                      <p>{{ item.shopTitle }}</p>

                      <p>
                        分类:
                        <span v-if="item.categoryNames">
                          {{
                          item.categoryNames
                          }}
                        </span>
                        <span v-else>其他</span>
                      </p>
                    </div>
                  </div>
                </td>
                <td>{{ format_num(item.extensionProIncr) }}</td>
                <td>{{ format_num(item.associatedAuthor) }}</td>
                <td>
                  <span>
                    {{
                    format_num(item.associatedVideoIncr)
                    }}
                  </span>
                  <!-- <span v-else>--</span> -->
                </td>
                <td>
                  <span v-if="item.associatedliveIncr != 0">
                    {{
                    format_num(item.associatedliveIncr)
                    }}
                  </span>
                  <span v-else>--</span>
                </td>
                <!-- 销售额字段 -->

                <td>{{ format_num(item.volume) }}</td>
                <td>{{ format_num(item.amount) }}</td>
                <!-- <td>
              {{ formatRate(item.conversionRatio, 1) }}
                </td>-->
                <td>
                  <div class="optionBox">
                    <button @click="toDetails(item.shopId)">查看详情</button>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="upgradeBox" v-if="!permissions && !loading">
            <RankUpgrade class="rankUpgrade" />
          </div>
          <!-- <div class="upgradeBox" v-if="permissions && !loading && vipLevel==0">
            <RankUpgrade class="rankUpgrade" />
          </div> -->
          <!-- <p
            class="nothing"
            v-show="
              dataList.length < 30 &&
                !loading &&
                permissions &&
                dataList.length != 0
            "
          >我是有底线的～</p> -->
          <div class="pageBox" v-if="!loading && needing">
            <el-pagination
              background
              layout="prev, pager, next, jumper"
              :total="count"
              :page-size="30"
              :current-page="page"
              @current-change="getData"
              :hide-on-single-page="true"
            ></el-pagination>
          </div>
        </section>
        <div
          v-loading="loading"
          v-if="loading && needing"
          class="loading"
          element-loading-text="拼命加载中..."
          element-loading-spinner="el-icon-loading"
        ></div>

        <div class="empty addTop" v-show="!needing && !loading">
          <img src="@/assets/liu/zw.png" />
          <p>暂无数据</p>
        </div>

        <!-- 数据更新时间 -->
        <div class="updateTime" v-if="updateTime != ''">
          数据更新时间：
          <span>{{ timestamp(updateTime, "Y-M-D h:m") }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import category_goods from '@/component/category_goods';
import html2canvas from 'html2canvas';
import RankUpgrade from '@/component/rankUpgrade.vue';

export default {
  name: 'shopList',
  components: { RankUpgrade, category_goods },
  data() {
    return {
      checkedDatasJoe: {
        //商品类目数据初始数据，新筛选组件用
        parentId: 0,
        childIds: []
      },
      activeName: 'first',
      shopKind: ['全部', '日用百货'],
      dataList: [],
      page: 1,
      count: 0,
      permissions: 1,
      keywords: '',
      time: '日榜',
      rank: 2,
      cancel: null,
      sort: 5,
      orderBy: 0, //0降序 1升序
      needing: true,
      loading: true,
      updateTime: '',
      showLeft: true,
      isFixed: false,
      offsetTop: 0,
      vipLevel: ''
    };
  },
  computed: {},
  watch: {
    checkedDatasJoe() {
      this.page = 1;
      this.dataList = [];
      this.getData();
    },
    time: function (newVal, oldVal) {
      this.page = 1;
      this.dataList = [];
      this.getData();
    },
    keywords: function (newVal, oldVal) {
      if (newVal == '') {
        this.page = 1;
        this.dataList = [];
        this.getData();
      }
    },
    '$store.state.left_nav_flag'(old, newOld) {
      this.showLeft = newOld;
      if ((newOld = false)) {
        this.setTBBar();
      } else {
        this.setTBBar();
      }
    }
  },
  created() {
    this.vipLevel = localStorage.getItem('vipLevel'); //会员等级
    // this.getData()
    // console.log(this.time);
  },
  mounted() {
    window.addEventListener('scroll', this.initHeight);
    window.addEventListener('resize', () => {
      //给浏览器窗口绑定变化大小事件
      this.setTBBar();
    });
  },

  methods: {
    // 获取子节点函数（后期可集成到一个库里）
    getChilds(pNode) {
      if (!pNode) return false;
      let nodes = pNode.childNodes;
      let newList = [];
      for (let i = 0; i < nodes.length; i++) {
        let node = nodes[i];
        if (node.nodeType === 1) {
          //判断类型
          newList.push(node);
        }
      }
      return newList;
    },
    // 设置表格表头滑动置顶
    setTBBar() {
      this.$nextTick(() => {
        let tableEl = this.$refs.tableEl;
        let ulEl = this.$refs.fixedThead;
        let tr1 = document.querySelector('#tr1');
        // thTrEl.style.width = tableEl.offsetWidth+'px';
        if (tr1) {
          let tds = this.getChilds(tr1);
          let liEls = this.getChilds(ulEl);

          for (let i = 0; i < liEls.length; i++) {
            liEls[i].style.width = tds[i].offsetWidth + 'px';
          }
        }
      });
    },
    getData(cpage) {
      let that = this;
      if (cpage) {
        that.page = cpage;
        that.backTop();
        //console.log("page", this.page);
      }
      that.loading = true;

      this.dataList = [];
      // 商品类目
      that.$axios
        .post(
          '/api/shop/search',
          {
            date: that.time.split('?')[1],
            CategoryId: this.checkedDatasJoe.parentId,
            categoryIds: this.checkedDatasJoe.childIds,
            key: this.trimStr(that.keywords),
            sort: that.sort,
            orderBy: that.orderBy,
            pageIndex: that.page,
            pageSize: 30
          },
          {
            cancelToken: new that.$axios.CancelToken(function executor(c) {
              if (that.cancel != null) {
                that.cancel();
              }
              that.cancel = c;
            })
          }
        )
        .then(res => {
          if (res.data.code == 0) {
            that.dataList = res.data.data.shopList;
            that.setTBBar();
            that.updateTime = res.data.data.timeUnix;

            that.count = res.data.count;
          }
          if (res.data.code == 1002) {
            this.needing = false;
          } else {
            this.needing = true;
          }
          if (res.data.code1 == 1013||res.data.code == 1003||res.data.code ==1013) {
            this.permissions = 0;
            this.table_data01 = [];
          } else {
            this.permissions = 1;
          }
          that.loading = false;
        })
        .catch(err => {
          console.log(err);
        });
    },
    // 搜索
    toSearch() {
      this.dataList = [];
      this.page = 1;
      this.getData();
    },
    // 分享
    generatorImage() {
      var that = this;
      // 时间
      let date;
      switch (that.time.split('?')[0]) {
        case '日榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日';
          break;
      }
      const loading = this.$loading({
        lock: true,
        text: '导出中...',
        spinner: 'el-icon-loading',
        customClass: 'customClass'
      });
      var shareContent;
      shareContent = this.$refs.capture; //需要截图的包裹的（原生的）DOM 对象
      console.log('shareContent', shareContent);
      var width = shareContent.offsetWidth; //获取dom 宽度
      var height = shareContent.offsetHeight; //获取dom 高度
      var canvas = document.createElement('canvas'); //创建一个canvas节点
      //   var scale = window.devicePixelRatio //定义任意放大倍数 支持小数 //   var scale = 2 //定义任意放大倍数 支持小数
      var scale = 1;
      canvas.width = width * scale * scale; //定义canvas 宽度 * 缩放
      canvas.height = height * scale * scale; //定义canvas高度 *缩放
      canvas.style.width = width + 'px';
      canvas.style.height = height + 'px';
      canvas.getContext('2d').scale(scale, scale); //获取context,设置scale
      var opts = {
        dpi: window.devicePixelRatio,
        scale: scale, // 添加的scale 参数
        useCORS: true,
        canvas: canvas, //自定义 canvas
        logging: true //日志开关
      };
      html2canvas(shareContent, opts).then(canvas => {
        let str;
        str = `《抖音小店排行榜-${date}》.png`;
        canvas.toBlob(
          function (blob) {
            const eleLink = document.createElement('a');
            eleLink.download = str;
            eleLink.style.display = 'none';
            // 字符内容转变成blob地址
            eleLink.href = URL.createObjectURL(blob);
            // 触发点击
            document.body.appendChild(eleLink);
            eleLink.click();
            // 然后移除
            document.body.removeChild(eleLink);
          },
          'image/png',
          1
        );
        loading.close();
      });
    },
    // 导出
    // 文字加replace 数字加\t
    export_data() {
      let that = this;
      // 时间
      let date;
      switch (that.time.split('?')[0]) {
        case '日榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日';
          break;
      }
      let str = '';
      str = `排名,排名变动,店铺名称,店铺分类,推广商品数,关联达人数,关联视频数,关联直播数,抖音日访客量,全网日销量\n`;

      for (let i = 0; i < that.dataList.length; i++) {
        str += `${that.dataList[i].rank},${that.dataList[i].diff},\"${that.dataList[
          i
        ].shopTitle.replace(/"/g, '""')}\",\"${that.dataList[i].categoryNames.replace(
          /"/g,
          '""'
        )}\",${that.format_num(that.dataList[i].extensionProIncr)},${that.format_num(
          that.dataList[i].associatedAuthor
        )},${that.format_num(that.dataList[i].associatedVideoIncr)},${that.format_num(
          that.dataList[i].associatedliveIncr
        )},${that.format_num(that.dataList[i].views)},${that.format_num(
          that.dataList[i].volume
        )}\n`;
      }
      var blob = new Blob([str], { type: 'text/plain;charset=utf-8' }); //解决中文乱码问题
      blob = new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });
      let object_url = window.URL.createObjectURL(blob);
      var link = document.createElement('a');
      link.href = object_url;
      let str_name = '';
      str_name = `《抖音小店排行榜-${date}》.csv`;

      link.download = str_name;
      document.body.appendChild(link);
      link.click();
      document.body.removeChild(link);
    },
    // 排序
    sort_fun(parm01, parm02) {
      if (parm01) {
        this.orderBy = 1;
      } else {
        this.orderBy = 0;
      }
      this.sort = parm02;
      this.page = 1;
      this.dataList = [];
      this.getData();
    },

    toDetails(id) {
      let router = this.$router.resolve({
        path: `/talent_main/shopDetails/${id}/0`
      });
      window.open(router.href, '_blank');
    },
    toBuy() {
      let router = this.$router.resolve({
        path: `/talent_main/buy`
      });
      window.open(router.href, '_blank');
    },
    backTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    },
    initHeight() {
      var scrollTop =
        window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
      this.isFixed = scrollTop > 260 ? true : false;
    }
  },
  destroyed() {
    window.removeEventListener('scroll', this.initHeight);
  }
};
</script>
<style lang="less" scoped>
#shopList {
  height: fit-content;
  margin-top: @margin-num;
  margin-left: @margin-num;
  margin-right: @margin-num;
  // padding-top: 17px;
  border-radius: 4px;
  position: relative;
  /* 搜索框 */
  .imgBox {
    background: url('../../../assets/wang/talentCompare/search-nohover.png') no-repeat 10px 7px,
      #fff;
    background-size: 15px 15px;
  }
  .imgBox:hover {
    background: url('../../../assets/wang/talentCompare/search.png') no-repeat 10px 7px, #fff;
    background-size: 15px 15px;
  }
  .updateTime {
    font-size: 14px;
    color: #888888;
    position: absolute;
    top: 20px;
    right: 20px;
    span {
      // font-family: DINAlternate-Bold;
      font-size: 15px;
      color: #888;
      // padding-left: 10px;
    }
  }
  .timeOptions {
    display: inline-block;
  }
  .search01 {
    display: inline-block;
    margin-left: 14px;
    .searchBox {
      margin-top: 0 !important;
    }
  }
  .btn_group {
    text-align: right;
    float: right;
    button {
      width: 70px;
      height: 32px;
      border-radius: 4px;
      border: solid 1px #e5e5e5;
      font-size: 14px;
      // line-height: 30px;
      box-sizing: border-box;
      color: #555;
      text-align: center;
    }
    button:nth-of-type(2) {
      color: #67ac5b;
      border: 1px solid #67ac5b;
    }

    > button:nth-child(1) {
      margin-right: 10px;
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../assets/zhao/fenx.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    > button:nth-child(2) {
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../assets/zhao/daoc.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    button:nth-of-type(1):hover {
      color: #777;
      span {
        background: url('../../../assets/zhao/fenx_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
    button:nth-of-type(2):hover {
      color: #80be76;
      border-color: #80be76;
      span {
        background: url('../../../assets/zhao/daoc_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
  }
  table {
    margin-top: 14px;
    text-align: center;
    thead {
      img {
        width: 5px;
        height: 10px;
        vertical-align: 0;
        margin-right: 2px;
        cursor: pointer;
      }
      tr {
        th:nth-child(1) {
          width: 8%;
        }
        th:nth-child(2) {
          width: 22%;
          text-align: left;
          padding-left: 10px;
        }
        // th:nth-child(3),
        // th:nth-child(4),
        // th:nth-child(5),
        // th:nth-child(6),
        // th:nth-child(7) {
        //   width: 10%;
        // }
        // th:nth-child(8) {
        //   width: 8%;
        // }
        th:nth-child(9) {
          width: 11%;
        }
      }
    }
    tbody {
      tr {
        height: 78px;
        td:nth-child(1),
        td:nth-child(3),
        td:nth-child(4),
        td:nth-child(5),
        td:nth-child(6),
        td:nth-child(7),
        td:nth-child(8),
        td:nth-child(9) {
          font-family: DINAlternate-Bold;
          font-size: 15px;
          color: #222222;
        }
        td:nth-child(1) {
          font-family: DINAlternate-Bold;
          font-size: 15px;
          color: #222;
        }
      }
    }

    // 店铺
    .shopBox {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      text-align: left;
      object-fit: cover;
      cursor: pointer;
      img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 1px solid #e5e5e5;
      }
      .rightBox {
        flex: 1;
        text-align: left;
        margin-left: 13px;
      }
      .rightBox p:nth-of-type(1) {
        width: 200px;
        font-size: 14px;
        color: #222222;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .rightBox p:nth-of-type(1):hover {
        color: #ff924b;
      }
      .rightBox p:nth-of-type(2) {
        font-size: 14px;
        color: #888888;
        span {
          color: #888;
          padding-left: 14px;
        }
        span:hover {
          color: #ff924b;
        }
      }
    }
    // 操作
    .optionBox {
      border-radius: 0px 4px 4px 0px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      button {
        width: 88px;
        height: 32px;
        background-color: transparent;
        border-radius: 4px;
        font-size: 14px;
        color: #fd7f2c;
        border: 1px solid #fd7f2c;
      }
      button:hover {
        color: #ff924b;
        border-color: #ff924b;
      }
    }
    // 问号图片
    .remarkImg {
      display: inline-block;
      width: 14px;
      height: 14px;
      vertical-align: middle;
      margin-top: -5px;
    }
  }
  .rightBox01 {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;

    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border-radius: 6px;
    .btn_group01 {
      button {
        font-size: 14px;
        background-color: #fd7f2c;
        color: #ffffff !important;
        padding-left: 23px;
        padding-right: 23px;
        height: 40px;
        border-radius: 4px;
        margin-right: 7px;
        font-weight: 600;
      }
    }
  }
  .rightBox-content {
    background-color: #ffffff;
    border-radius: 6px;
    margin-top: 10px;
    padding: 20px 20px 0 20px;
    min-height: 100vh;
    padding-bottom: 1px;
  }
}
// 升级会员
.upgradeBox {
  min-height: 60vh;
  position: relative;
  .rankUpgrade {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
.fixedThead {
  display: none;
  position: fixed;
  top: 60px;
  left: 200px;

  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background-color: #f5f9ff;
  height: 48px;
  line-height: 48px;
  overflow: hidden;
  z-index: 99;
  font-size: 0;
  li {
    box-sizing: border-box;
    display: inline-block;
    font-size: 14px;
  }
  // 问号图片
  .remarkImg {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-top: -5px;
  }

  &.isShow {
    display: block;
  }
  .sort {
    width: 5px;
    height: 10px;
    vertical-align: 0;
  }
  li:nth-child(7) {
    .sort {
      margin-left: -9px;
    }
  }
}
[tc] {
  text-align: center;
}
[tl] {
  text-align: left;
}
[tr] {
  text-align: right;
}
.m-l {
  margin-left: -9px;
}
</style>
